﻿<%@ Page Language="C#" MasterPageFile="~/Back/BackgroundMain.master" AutoEventWireup="true"
    CodeFile="BgPicAdd.aspx.cs" Inherits="Back_BgPicAdd" Title="添加图片页面" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
function btn_LinkUrl_onclick()
{    
    window.open('ChooseLinkUrl.aspx?Type='+document.all["ctl00_ContentPlaceHolder1_ddl_PicType"].value,'list','height=550, width=535,oolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no');
}
    </script>

    <div style="text-align: left;">
        <div class="centertop" id="dvNav" runat="server">
            当前位置：<a href="BgArticleList.aspx">中共重庆市沙坪坝区委统一战线工作部</a>&nbsp;>>&nbsp;<a href="ImageList.aspx">图片管理</a>&nbsp;>>&nbsp;添加图片</div>
        <div class="picEdit">
            选择图片类型:&nbsp;&nbsp;
            <asp:DropDownList ID="ddl_PicType" runat="server">
                <asp:ListItem Text="主页幻灯图片" Value="PPT"></asp:ListItem>
                <asp:ListItem Text="图片新闻图片" Value="TPXW"></asp:ListItem>
                <asp:ListItem Text="上部专题图片" Value="STA"></asp:ListItem>
                <asp:ListItem Text="中部专题图片" Value="STB"></asp:ListItem>
                <asp:ListItem Text="底部专题图片" Value="STC"></asp:ListItem>
            </asp:DropDownList>
        </div>
        <div class="picEdit">
            标题：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox
                ID="tb_Title" runat="server"></asp:TextBox></div>
        <div class="picEdit">
            <div style="padding-left: 85px; padding-top: 10px; padding-bottom: 5px">
                <asp:Image ID="img_NewsPic" runat="server" ImageUrl="~/images/图片预览区域.jpg" ImageAlign="Middle"
                    BorderWidth="1px" /></div>
            <div>
                上传图片:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:FileUpload ID="fuSampleURL" runat="server" EnableTheming="True" />
            </div>
        </div>
        <div class="picEdit">
            链接地址：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="txb_LinkURL" runat="server"></asp:TextBox><input id="btn_LinkURL"
                type="button" value="浏览…" onclick="return btn_LinkUrl_onclick()" style="width: 70px;
                height: 20px" />
            <br />
        </div>
        <div class="picEdit">
            <asp:Button ID="UploadButton" runat="server" Height="22px" Width="80px" OnClick="UploadButton_Click"
                SkinID="nextButton" Text="提交" ValidationGroup="PostInfo"/>
               
            <input type="button" onclick='window.location.href="ImageList.aspx"' value="返回" style="height: 22px;
                width: 80px;" />
        </div>
        <br />
         <div class="errorlist">
            <asp:ValidationSummary ID="ValidationSummary1" ShowSummary="true" runat="server"
                HeaderText="请看下面的出错信息：" ValidationGroup="PostInfo" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_Title"
                ValidationGroup="PostInfo" ErrorMessage="请图片标题！" Display="None"></asp:RequiredFieldValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txb_LinkURL"
                ValidationGroup="PostInfo" ErrorMessage="请选择图片链接地址！" Display="None"></asp:RequiredFieldValidator>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="fuSampleURL"
                ValidationGroup="PostInfo" ErrorMessage="请上传图片！" Display="None"></asp:RequiredFieldValidator>
        </div>
    
    </div>
</asp:Content>
